package dao;

import model.Order;

import java.util.List;

/**
 * The interface Order dao.
 */
public interface OrderDao {
    /**
     * Insert int.
     *
     * @param order the order
     * @return the int
     */
    int insert(Order order);

    /**
     * Delete int.
     *
     * @param oid the oid
     * @return the int
     */
    int delete(int oid);

    /**
     * Select by oid order.
     *
     * @param oid the oid
     * @return the order
     */
    Order selectByOid(long oid);

    /**
     * Select by uid list.
     *
     * @param uid       the uid
     * @param pageIndex the page index
     * @param pageSize  the page size
     * @return the list
     */
    List<Order> selectByUid(long uid, int pageIndex, int pageSize);

    /**
     * Select by sid list.
     *
     * @param sid       the sid
     * @param pageIndex the page index
     * @param pageSize  the page size
     * @return the list
     */
    List<Order> selectBySid(long sid, int pageIndex, int pageSize);

    /**
     * Select all list.
     *
     * @param pageIndex the page index
     * @param pageSize  the page size
     * @return the list
     */
    List<Order> selectAll(int pageIndex, int pageSize);

    /**
     * Update int.
     *
     * @param trodeNo the order
     * @return the int
     */
    int update(String trodeNo);

    /**
     * Count all int.
     *
     * @return the int
     */
    int countAll();

    /**
     * Count by sid int.
     *
     * @param sid the sid
     * @return the int
     */
    int countBySid(long sid);

    /**
     * Count by uid int.
     *
     * @param uid the uid
     * @return the int
     */
    int countByUid(long uid);
}
